﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
         <div class="cleaner_with_height"></div>
   <asp:Panel ID="Panel1" runat="server">
   
    <div class="competition_box">
       <div class="menuTitle">Upcoming Competitions</div>
       <br />
            <asp:DataList ID="dtl_Upcoming" runat="server">
               <ItemTemplate>
                  <img src="<%#Eval("Url")%>"  width="100px" height="150px" alt="" />
              <div class="competition_info">
                  <div class="competition_item_left">Topic:</div> <div class="competition_item_right"><%#Eval("CompetitionName") %></div>
              <div class="cleaner"></div>
                  <div class="competition_item_left">Details:</div> <div class="competition_item_right"><%#Eval("Details") %></div><br />
                  <div class="competition_item_left">Condition:</div> <div class="competition_item_right"><%#Eval("Conditions") %></div><br />
                  <div class="competition_item_left">Start Date</div><div class="competition_item_right"><%#Eval("StartDate", "{0:MMMM d, yyyy}")%></div><br />          
                  <div class="competition_item_left">End Date:</div> <div class="competition_item_right"><%#Eval("EndDate", "{0:MMMM d, yyyy}")%></div><br />
                    <asp:Label ID="lblCompetitionID" runat="server" Text='<%#Eval("CompetitionID")%>' Visible="false"></asp:Label>
                 <div class="competition_item_left">Awards:</div>

            <asp:DataList ID="dtl_Awards_Upcoming" runat="server" Width="300px">
               <ItemTemplate>            
                 <div class="competition_item_right" ><%#Eval("AwardName")%>: $ <%#Eval("Prize") %>   </div>
               </ItemTemplate>
          </asp:DataList>             
        </div>
        <div class="cleaner">&nbsp;</div>
        </ItemTemplate>
        </asp:DataList>
            <asp:Label ID="lblUpcoming_" runat="server" Text=""></asp:Label>
      </div>
     
    </asp:Panel>

   <asp:Panel ID="Panel2" runat="server">

     <div class="cleaner_with_height">&nbsp;</div>  
       <div class="competition_box">
       <div class="menuTitle">Ongoing Competitions</div>
       <br />
            <asp:DataList ID="dtl_Ongoing" runat="server">
               <ItemTemplate>
                  <img src="<%#Eval("Url")%>"  width="100px" height="150px" alt="" />
              <div class="competition_info">
                  <div class="competition_item_left">Topic:</div> <div class="competition_item_right"> <a href="Postings.aspx?CompetitionID=<%# Eval("CompetitionID") %>"><%# Eval("CompetitionName") %></a>  </div>
              <div class="cleaner"></div>
                  <div class="competition_item_left">Details:</div> <div class="competition_item_right"><%#Eval("Details") %></div><br />
                  <div class="competition_item_left">Condition:</div> <div class="competition_item_right"><%#Eval("Conditions") %></div><br />
                  <div class="competition_item_left">Start Date</div><div class="competition_item_right"><%#Eval("StartDate", "{0:MMMM d, yyyy}")%></div><br />          
                  <div class="competition_item_left">End Date:</div> <div class="competition_item_right"><%#Eval("EndDate", "{0:MMMM d, yyyy}")%></div><br />
                    <asp:Label ID="lblCompetitionID" runat="server" Text='<%#Eval("CompetitionID")%>' Visible="false"></asp:Label>
                 <div class="competition_item_left">Awards:</div>

            <asp:DataList ID="dtl_Awards_Ongoing" runat="server" Width="300px">
               <ItemTemplate>            
                 <div class="competition_item_right" ><%#Eval("AwardName")%>: $ <%#Eval("Prize") %>   </div>
               </ItemTemplate>
          </asp:DataList>  
          <div class="competition_item_left">Submissions:</div> <div class="competition_item_right"><asp:Label ID="lb_Total" runat="server"></asp:Label></div>        
          <a href="Postings.aspx?CompetitionID=<%# Eval("CompetitionID") %>">View Postings</a>
        </div>
        <div class="cleaner">&nbsp;</div>
        
        </ItemTemplate>
        </asp:DataList>
           <asp:Button ID="btnJoin" runat="server" Text="Join" style="float:right" 
               Width="70px" onclick="btnJoin_Click" />
                       <asp:Label ID="lblOngoing_" runat="server" Text=""></asp:Label>
      </div>    

    </asp:Panel>
</asp:Content>

